#ifndef __PLAYER_MSG_HANDLER__
#define __PLAYER_MSG_HANDLER__


#include "Message/MsgHandlerLgc.h"
#include "Entity/EntityManagerIf.h"


class  PlayerMsgHandler : public MsgHandlerLgc
{
public:
	PlayerMsgHandler();
	~PlayerMsgHandler();

	virtual bool initialize(IMsgHandlerInitData* data) ;

	virtual bool handleMsg(IMsg* pMsg);
protected:
	//
	//	message from DB 
	void onRcvDBRoleMsg(IMsg* pMsg);
	void onRcvDBItemMsg(IMsg* pMsg);
	void onRcvDBFormMsg(IMsg* pMsg);
	void onRcvDBProgressMsg(IMsg* pMsg);

	//
	//	message from client
	void onRcvCliMsg(IMsg* pMsg);

protected:
	void onQueryMainRoleInfoRequest(IMsg* pMsg);



protected:
	void onLoadMainRoleDetailResponse(IMsg* pMsg);
	void onLoadRolesResponse(IMsg* pMsg);
	void onUpdateRoleResponse(IMsg* pMsg);
	void onRemoveRoleResponse(IMsg* pMsg);

protected:
	IEntity*		m_wpCurEtt;
	PlayerData*		m_wpCurPlayer;

	PlayerDataManager*	m_wpPlayerDataMgr;
	IEntityManager* m_wpEttMgrLogin;
	IEntityManager*	m_wpEttMgrWorld;
};




#endif